package com.itheima.day08;
/*
案例5:统计个字符类型数
 */
import java.util.Scanner;

public class TestClassCase05 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入字符串:");
        String s = sc.nextLine();

        char[] ch = s.toCharArray();

        int numCount = 0;
        int bigCount = 0;
        int smaCount = 0;

        for (int i = 0; i < ch.length; i++) {
            if (ch[i] >= '0' && ch[i] <= '9') {
                numCount++;
            } else if (ch[i] >= 'a' && ch[i] <= 'z') {
                smaCount++;
            } else if (ch[i] >= 'A' && ch[i] <= 'Z') {
                bigCount++;
            }

        }
        System.out.println("数字个数:" + numCount);
        System.out.println("小字母个数:" + smaCount);
        System.out.println("大字母个数:" + bigCount);
    }
}